/**
 * @file slog_port.c
 * @author TianBeiBei (tianbeibei5628@dingtalk.com)
 * @brief
 * @version 0.1
 * @date 2025-01-17
 *
 * @copyright Copyright (c) 2025
 *
 */
#include <string.h>

#include "SEGGER_RTT.h"

int slog_port_output(const char *log) {
    if (log == NULL) {
        return 0;
    }
    if (strlen(log) == 0) {
        return 0;
    }

    return SEGGER_RTT_Write(0, log, strlen(log));
}

// int slog_output(const char *format, ...) {
//     int     r;
//     va_list ParamList;

//     va_start(ParamList, sFormat);
//     r = SEGGER_RTT_vprintf(0, sFormat, &ParamList);
//     va_end(ParamList);
//     return r;
// }